/*
* 文 件 名:  AbstractQueryDTO.java
* 版    权:  Tydic Technologies Co., Ltd. Copyright 1993-2012,  All rights reserved
* 描    述:  分页查询时，数据传输对象基类
* 修 改 人:  aganzhoul
* 修改时间:  2012-5-24
* 跟踪单号:  <跟踪单号>
* 修改单号:  <修改单号>
* 修改内容:  <修改内容>
*/
package com.tydic.framework.dataobject;

import java.io.Serializable;

/**
 * 
 * 分页查询时或其它复合查询时，查询条件的基类
 * 
 * @author  aganzhoul
 * @version  [版本号, 2012-5-28]
 * @see  [相关类/方法]
 * @since  [产品/模块版本]
 */
public abstract class AbstractQueryDTO implements Serializable {
    
    /**
    * 注释内容
    */
    
    private static final long serialVersionUID = 5358612476304143534L;
    
    private Pagination pagination;
    
    public Pagination getPagination() {
        return pagination;
    }
    
    public void setPagination(Pagination pagination) {
        this.pagination = pagination;
    }
    
    @Override
    public String toString() {
        return "AbstractQueryDTO [pagination=" + pagination + "]";
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((pagination == null) ? 0 : pagination.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        AbstractQueryDTO other = (AbstractQueryDTO)obj;
        if (pagination == null) {
            if (other.pagination != null)
                return false;
        }
        else if (!pagination.equals(other.pagination))
            return false;
        return true;
    }
}
